package com.drguo.higouguo.utils;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.UUID;
/**
 * UUID、当前时间、货号
 * @author guo
 */
public class GuoUtil {
	public static String getId(){
		UUID uuid = UUID.randomUUID();
		return uuid.toString().replaceAll("-", "");
	}
	
	public static String getNowTime(){
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		return sdf.format(new Date());
	}
	/**
	 * 产生商品货号（保证不重复）
	 * @return
	 */
	public static String getGoodsNo(){
		SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
		return sdf.format(new Date());
	}
}
